Skip to content

[FEATURE] Added dispute_assertion() to Dispute Module#66

Merged
aandrewchung merged 5 commits intomainfrom
andrew/dispute-assertion-only
Apr 23, 2025
Merged

[FEATURE] Added dispute_assertion() to Dispute Module#66
aandrewchung merged 5 commits intomainfrom
andrew/dispute-assertion-only

Conversation

@aandrewchung
Copy link
Contributor

Description

  • Added dispute_assertion to Dispute module and respective integration test
  • Added allowance() to WIP module
  • Updated script to change "from" variable to "from_address"

Test Plan

  • Ensure all integration tests pass

Related Issue

n/a

Notes

  • No multicall or auto mint for WIP is in this implementation

Copy link
Contributor

@bpolania bpolania left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@DracoLi DracoLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

else:
function_name_counts[item['name']] = 1

# Process inputs, replacing 'from' with 'from_address'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this change for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"from" is a reserved keyword in python

"""
try:
# Validate IP ID
# ip_id = self._validate_address(ip_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be uncommented?

ip_account = IPAccountImplClient(self.web3, contract_address=ip_id)

# Get assertion details to determine bond amount
bond = get_assertion_details(self.web3, self.arbitration_policy_uma_client, assertion_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a check here to ensure the wallet has enough wip? if not, we can throw a more detailed error msg, to hint that the wip client should be used to convert ip -> wip, and also indicate the bond required.

ip_account = IPAccountImplClient(self.web3, contract_address=ip_id)

# Get assertion details to determine bond amount
bond = get_assertion_details(self.web3, self.arbitration_policy_uma_client, assertion_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think need a helper method to get the bond amount for an assertion_id in this client. otherwise, no way for users to know how much bond is needed.

Copy link
Contributor

@DracoLi DracoLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one non-blocking suggestion

"""
return arbitration_policy_uma_client.oov3()

def get_assertion_details(web3: Web3, arbitration_policy_uma_client: ArbitrationPolicyUMAClient, assertion_id: str) -> int:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this can just be get_assertion_bond for clarity.

@aandrewchung aandrewchung merged commit 3850667 into main Apr 23, 2025
10 checks passed
@aandrewchung aandrewchung deleted the andrew/dispute-assertion-only branch April 23, 2025 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants